﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication9
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_MouseEnter(object sender, EventArgs e)
        {
            MoveNOButton();
        }
        private void MoveNOButton()
    {
         Random r;
        r = new Random();
        
 
        button2.Top = r.Next(Height - button2.Height);
            button2.Left = r.Next(Width - button2.Width);
    }

        private void button2_MouseMove(object sender, MouseEventArgs e)
        {
            MoveNOButton();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            button2.Visible = false;
            button1.Height = Height;
            button1.Width = Width;


        }

        private void button1_MouseEnter(object sender, EventArgs e)
        {
            MessageBox.Show("Поздравляю!!! Тест пройден!");
            Close();

        }
    
    
   
    }
}
